var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../behavior/orderBehavior"));

Component({
    behaviors: [ e.default ],
    properties: {
        order: {
            type: Object,
            observer: function(e) {
                1 == this.properties.orderType ? this.setData({
                    statusText: this.getRobotOrderStatusTitle(e.orderStatus)
                }) : this.setData({
                    statusText: this.getShopOrderStatusTitle(e.orderStatus)
                });
            }
        },
        orderType: {
            type: Number,
            optionalTypes: [ String ]
        }
    },
    data: {
        statusText: ""
    },
    methods: {
        toDetails: function() {
            1 == this.properties.orderType ? wx.navigateTo({
                url: "/pages/robot_detail/robot_detail?orderNo=".concat(this.properties.order.orderNo)
            }) : wx.navigateTo({
                url: "/pages/shop_detail/shop_detail?orderId=".concat(this.properties.order.orderId)
            });
        }
    }
});